package io.stream_convert_char;

import java.io.*;

public class FileReaderDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("file.txt");
        FileWriter fileWriter = new FileWriter(file);

        fileWriter.append("sdfdsfdsf");
        fileWriter.append("sdfdsfdsf32");
        fileWriter.close();

        FileReader fileReader = new FileReader(file);
        char[] buf = new char[1024];

        while (fileReader.read(buf) != -1) {
            System.out.println(new String(buf));
        }

    }
}
